function Ninja(){
    var _skill=0;


    Object.defineProperty(this,'skill',{
        get:()=>{
            return _skill;
        },
        set(v) {
            _skill=v;
        }
    })

}

Ninja.prototype.toString=function () {
    return _skill
}

var ni=new Ninja();
ni.skill=10;
console.log(ni);